package com.nxk.modules.content.api;

import com.nxk.modules.content.entity.ConMessage;
import com.nxk.modules.content.service.ConMessageService;
import com.nxk.modules.exception.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/web/api/message")
public class MessageApiController {


    @Autowired
    private ConMessageService conMessageService;


    @PostMapping("saveMessage")
    public ResultEntity saveMessage(ConMessage conMessage) {
        boolean save = conMessageService.save(conMessage);
        return save ? ResultEntity.success() : ResultEntity.fail();
    }

}
